package com.gof.example.memo;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/11 10:39.
 * haiming.fei@tongdun.cn
 */
public class Game {

    private String environment;

    public MemoInfo save() {
        return new MemoInfo(this);
    }

    public void restore(MemoInfo memoInfo) {
        this.environment = memoInfo.getEnvironment();
    }

    public String getEnvironment() {
        return environment;
    }

    public void setEnvironment(String environment) {
        this.environment = environment;
    }

    @Override
    public String toString() {
        return "Game{" +
                "environment='" + environment + '\'' +
                '}';
    }
}
